#ifndef FCSYNC_H
#define FCSYNC_H

#include <QMainWindow>
#include <QDebug>
#include <QMessageBox>
#include "analyse.h"
#include "filecalltomd5.h"
#include "filecopyer.h"

namespace Ui {
class FcSync;
}

class FcSync : public QMainWindow
{
    Q_OBJECT
public:
    explicit FcSync(QWidget *parent = 0);
    ~FcSync();

signals:
    void starting(const QString &source, const QString &toDir);

private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_5_clicked();

    void itemPressedSlot(QTreeWidgetItem * pressedItem, int column);

    bool copyFileToPath(const QString &sourceDir, const QString &File, const QString &toDir);

    bool copyDirectoryFiles(const QString &fromDir, const QString &toDir, bool coverFileIfExist);

    bool clearDir(QString path);

    void mklog();

private:
    Ui::FcSync *ui;
    QString path1;
    QString path2;
    fileCallToMd5 md5;
    analyse anal;

};

#endif // FCSYNC_H
